/*
 * @Author: zi.yang
 * @Date: 2021-10-02 13:39:17
 * @LastEditors: zi.yang
 * @LastEditTime: 2021-10-04 23:53:02
 * @Description: In User Settings Edit
 * @FilePath: \ziYangPM\src\store\Dict\actions.js
 */
import request from '@/apis'

export default {
  // 获取所有字典
  FetchAllDictData: ({ commit }, data) => {
    return new Promise((resolve, reject) => {
      request
        .fetchAllDictData(data)
        .then((res) => {
          commit('SET_ALL_DICT_DATA', res.data)
          return resolve(res)
        })
        .catch((err) => reject(err))
    })
  }
}
